package com.bort.system.model;

import lombok.Data;
import org.apache.commons.lang3.time.DateFormatUtils;

import java.math.BigDecimal;
import java.util.Date;

@Data
public class User {

    protected Integer id;

    protected String name;

    protected String username;

    protected Byte type;

    protected String password;

    protected String phone;

    protected String avatar;

    protected Date createTime;

    protected Byte gender;

    protected Byte status;

    protected String unionid;

    private BigDecimal charge;

    private BigDecimal extra;

    private BigDecimal balance;

    private Integer createUserId;

    protected String createTimeStr;

    private String accessToken;

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
        this.createTimeStr = DateFormatUtils.format(createTime,"yyyy-MM-dd HH:mm:ss");
    }
}
